package com.kaiwu.tc.persistence.session;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author Captain
 * @date 2021/1/23
 **/
public interface SqlSession {
    <T> T getMapper(Class<?> className);
    <T> List<T> selectList(String statementId, Object... params) throws SQLException, InvocationTargetException, IntrospectionException, InstantiationException, IllegalAccessException, NoSuchFieldException;
    <T> T selectOne(String statementId, Object... params) throws SQLException, IntrospectionException, InstantiationException, IllegalAccessException, NoSuchFieldException, InvocationTargetException;
    int update(String statementId, Object... params) throws Exception;
}
